import { axios } from '@/utils/request'
import {servers} from '@/api/servers'
const serverName=servers.cms;
const api = {
    selectSlideshow: serverName+'/categorySlideshow/selectSlideshow',
    insertSlideshow: serverName+'/categorySlideshow/insertSlideshow',
    selectSlideshowDetails:serverName+'/categorySlideshow/selectSlideshowDetails',
    updateSlideshow: serverName+'/categorySlideshow/updateSlideshow',
    deleteSlideshow: serverName+'/categorySlideshow/deleteSlideshow',

    // save: serverName+'/categoryModel/save',
    // loadModels:serverName+'/categoryModel/loadModels',
    // delByPk:serverName+'/categoryModel/deleteByPk',
}
export default api

export function selectSlideshow (parameter) {
  return axios({
    url: api.selectSlideshow,
    method: 'post',
		headers: {
		  'Content-Type': 'application/json;charset=UTF-8'
		},
    data: parameter
  })
}

export function insertSlideshow (parameter) {
  return axios({
    url: api.insertSlideshow,
    method: 'post',
		headers: {
		  'Content-Type': 'application/json;charset=UTF-8'
		},
    data: parameter
  })
}

export function selectSlideshowDetails (parameter) {
  return axios({
    url: api.selectSlideshowDetails,
    method: 'get',
    params: parameter
  })
}

// export function save (parameter) {
//   return axios({
//     url: api.save,
//     method: 'post',
// 		headers: {
// 		  'Content-Type': 'application/json;charset=UTF-8'
// 		},
//     data: parameter
//   })
// }

export function updateSlideshow (parameter) {
  return axios({
    url: api.updateSlideshow,
    method: 'post',
		headers: {
		  'Content-Type': 'application/json;charset=UTF-8'
		},
    data: parameter
  })
}

export function deleteSlideshow(parameter) {
  return axios({
    url: api.deleteSlideshow,
    method: 'get',
    params: parameter
  })
}


// export function loadModels (parameter) {
//   return axios({
//     url: api.loadModels,
//     method: 'post',
//     headers: {
//       'Content-Type': 'application/json;charset=UTF-8'
//     },
//     data: parameter
//   })
// }





